package com.bean;

import com.bean.anno.TableExcel;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.time.LocalDateTime;
import java.util.Date;

@Data
@Entity
@Table(name = "question_info")
@TableExcel(name="questionInfo", content = "EasyExcel问题与回答",jpaBeanName="com.mapper.repository.QuestionInfoRepository")
public class QuestionInfo {

    @Id
    private String id;

    @Column(length = 5000)
    private String question;
    @Column(length = 5000)
    private String answer;

    private String status;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createtime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updatetime;

    @JsonProperty("userid")
    private String creator;
}
